<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>完善资料--普通用户</title>
    <link rel="stylesheet" type="text/css" href="../../../css/aui/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../../css/html/issued/post_your_want_frm.css" />
    <style>

    </style>
</head>

<body>
    <div id="app">
      <div class="aui-content aui-margin-b-15">
          <ul class="aui-list aui-form-list">
              <li class="aui-list-item">
                  <div class="aui-list-item-inner">
                      <div class="aui-list-item-label">昵称</div>
                      <div class="aui-list-item-input">
                          <input type="text" placeholder="请输入昵称">
                      </div>
                  </div>
              </li>
              <li class="aui-list-item">
                  <div class="aui-list-item-inner">
                      <div class="aui-list-item-label">所在地</div>
                      <div class="aui-list-item-input">
                          <input type="text" placeholder="请选择">
                      </div>
                  </div>
              </li>
              <li class="aui-list-item">
                  <div class="aui-list-item-inner">
                      <div class="aui-list-item-label">姓名</div>
                      <div class="aui-list-item-input">
                          <input type="text" placeholder="请填写姓名">
                      </div>
                  </div>
              </li>
              <li class="aui-list-item">
                  <div class="aui-list-item-inner">
                      <div class="aui-list-item-label">联系方式</div>
                      <div class="aui-list-item-input">
                          <input type="text" placeholder="请填写手机号">
                      </div>
                  </div>
              </li>
          </ul>

          <div class="aui-content-padded">
              <div style="margin:1rem 0 0.5rem 0;">上传图片<small style="font-size:0.5rem;color:#B7B7B7;">(支持上传单张图，图片大小不要超过1MB)</small></div>
              <div class="up_image_box">
                  <div class="up_image" onclick="addImg(this)">
                    <img src="../../../image/icon/shangchuan.png" style="width:40%" alt="">
                  </div>
              </div>
              <div class="btn">保存</div>
          </div>


      </div>
    </div>
</body>
<script src="../../../script/api.js" charset="utf-8"></script>
<script src="../../../script/aui/aui-tab.js" charset="utf-8"></script>
<script src="../../../script/common/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="../../../script/common/common.js" charset="utf-8"></script>
<script src="../../../script/common/config.js" charset="utf-8"></script>
<script src="../../../script/common/vue.min.js" charset="utf-8"></script>
<script>
    apiready = function() {
        api.parseTapmode();

    }

    var vm = new Vue({
        el: "#app",
        data: {},
        methods: {
            openWin(name) {
                var winInfo = {
                    personal_info: {
                        name: 'personal_info_win',
                        url: './personal_info_win.html'
                    },
                    case_show: {
                        name: 'case_show_win',
                        url: './case_show_win.html'
                    },
                    service_info: {
                        name: 'service_info_win',
                        url: './service_info_win.html'
                    }
                };
                if (name) {
                    open_w(winInfo[name].name, winInfo[name].url);
                } else {
                    $toast("正在开发中...");
                }
            },

        }
    });

    function addImg(e) {
        api.actionSheet({
            title: '上传头像',
            cancelTitle: '关闭',
            buttons: ['图片库', '相机 ', '相册']
        }, function(ret, err) {
            var index = ret.buttonIndex;
            var type = new Array('library ', 'camera', 'album');
            if (index != 4) {
                api.getPicture({
                    sourceType: type[index - 1],
                    encodingType: 'jpg',
                    mediaValue: 'pic',
                    destinationType: 'base64',
                    allowEdit: true,
                    quality: 50,
                    saveToPhotoAlbum: false
                }, function(ret, err) {
                    if (ret) {
                      $(e).find('img').attr('src',ret.data).css('width','100%');
                    }
                });
            }
        });
    }
</script>

</html>
